//
//  SYEditTextView.h
//  Foodie
//
//  Created by liyunqi on 10/12/16.
//  Copyright © 2016 SY. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SYPlaceHolderTextView.h"
@class SYEditTextView;
@protocol SYEditTextViewDelegate<NSObject>
@optional
-(void)textViewDidEndEditing:(SYEditTextView *)textView;
-(void)textViewDidBeginEditing:(SYEditTextView *)textView;
-(void)textViewDidChange:(SYEditTextView *)textView;
-(BOOL)textViewShouldEndEditing:(SYEditTextView *)textView;
-(BOOL)textViewShouldBeginEditing:(SYEditTextView *)textView;
- (BOOL)textView:(SYEditTextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text;
@end
@interface SYEditTextView : UIView

PROPERTY_WEAK id<SYEditTextViewDelegate,UITextViewDelegate> editViewDelegate;
PROPERTY_ASSIGN float margin;//default is 0
PROPERTY_ASSIGN BOOL limitMax;//default is NO
PROPERTY_ASSIGN BOOL showDone;//default YES
PROPERTY_ASSIGN NSInteger maxNum;//default 1000
PROPERTY_ASSIGN BOOL anyTimeShowDone;//yes
PROPERTY_STRONG SYPlaceHolderTextView *mtextView;
PROPERTY_STRONG UIButton *finishButton;

PROPERTY_ASSIGN BOOL delegateUseSelf;//NO
@end
